package java12;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;


public class InputStreamReaderTest {

	public static void main(String[] args) throws Exception{
		BufferedReader br = null;
		try {
			FileInputStream fis = new FileInputStream("d:/a.txt");
			InputStreamReader isr = new InputStreamReader(fis, "GBK");
			br = new BufferedReader(isr);
			String line = null;
			while((line=br.readLine())!=null)
				System.out.println(line);
		} finally{
			if (br!=null){
				br.close();
			}
		}
	}
}
